package com.itheima.controller;


import com.itheima.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    @Autowired
    private Person person;
    @Value("${personName}")
    private String personName;

    @RequestMapping("/hello")
    public String hello(){
        return "hello spring boot 02 !!!";
    }

    @RequestMapping("/getPersonName")
    public String getPersonName() {
        return personName;
    }

    @RequestMapping("/getPerson")
    public Person getPerson() {
        return person;
    }
}
